package com.duoduo.demo.springdb;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext3.xml")
public class AddActivitiTest {

	@Resource
	private JdbcTemplate jdbcTemplate;

	@Test
	public void listAllUser() {
		List<Map<String, Object>> dataList = jdbcTemplate.queryForList("select * from sys_user");
		Assert.assertNotNull(dataList);
		Assert.assertTrue(dataList.size() == 1);
	}
}
